<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja-JP">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
  <meta http-equiv="Content-Language" content="ja-JP">
<title>setup.rb $B$r;H$C$?%Q%C%1!<%8$r:n$k(B</title>
</head>
<body>

<h1>setup.rb $B$r;H$C$?%Q%C%1!<%8$r:n$k(B</h1>
<h2>$B%7%s%0%k%Q%C%1!<%8%"!<%+%$%V$r:n$k(B</h2>
<p>
$B!V%7%s%0%k%Q%C%1!<%8%"!<%+%$%V!W$H$O!"0J2<$N%U%!%$%k$,(B
$B0lAH$@$1F~$C$?%W%m%0%i%`%Q%C%1!<%8$N$3$H$G$9!#(B
</p>
<ul>
<li>$B%3%^%s%I(B</li>
<li>Ruby $B%i%$%V%i%j(B</li>
<li>Ruby $B3HD%%i%$%V%i%j(B</li>
<li>$B$=$NB>$N%G!<%?(B</li>
</ul>
<p>
$B$D$^$jIaDL$N%W%m%0%i%`%Q%C%1!<%8$N$3$H$G$9!#(B
</p>
<p>
$B%7%s%0%k%Q%C%1!<%8%"!<%+%$%V$r:n$k$K$O!"%"!<%+%$%V$r(B
$B0J2<$N%k!<%k$K=>$C$F%l%$%"%&%H$7$F$/$@$5$$!#(B
</p>
<pre>
$B%"!<%+%$%V$N%H%C%W(B/
  setup.rb
  bin/
      $B%3%^%s%IN`(B
  lib/
      Ruby $B%i%$%V%i%j(B
  ext/
      $B3HD%%b%8%e!<%k(B
  data/
      $B$=$NB>$N%G!<%?(B
  conf/
      $B@_Dj%U%!%$%k(B
  man/
      man $B%Z!<%8(B
  test/
      $B%F%9%H(B
</pre>
<p>
bin/, lib/, ext/, data/, conf/, man/ $B$N2<$K$O3F!9%$%s%9%H!<%k$5$l$k%$%a!<%8$r(B
$B$=$N$^$^$K%U%!%$%k$rG[CV$7$^$9!#Nc$($P(B lib/tmail/header.rb $B$H$$$&%U%!%$%k$r(B
$BCV$/$H(B RUBYLIB/tmail/header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G%#%l%/%H%j(B packages/ $B$r:n$j!"$=$N2<$K%Q%C%1!<%8L>$N%G%#%l%/%H%j(B
$B$r:n$j$^$9!#$=$7$F$=$NCf$K%7%s%0%k%Q%C%1!<%8%"!<%+%$%V$HF1$8(B
$B%G%#%l%/%H%j%D%j!<$rG[CV$7$^$9!#$D$^$jA4BNA|$O0J2<$N$h$&$K$J$j$^$9!#(B
</p>
<pre>
$B%"!<%+%$%V$N%H%C%W(B/
    setup.rb
    packages/
        tmail/      # tmail $B%Q%C%1!<%8(B
            bin/
            lib/
            ext/
            data/
            conf/
            man/
            test/
        raccrt/     # raccrt $B%Q%C%1!<%8(B
            bin/
            lib/
            ext/
            data/
            conf/
            man/
            test/
        strscan/    # strscan $B%Q%C%1!<%8(B
            bin/
            lib/
            ext/
            data/
            conf/
            man/
            test/
        amstd/      # amstd $B%Q%C%1!<%8(B
            bin/
            lib/
            ext/
            data/
            conf/
            man/
            test/
</pre>
<p>
packages/ $B$N2<$K$"$k%G%#%l%/%H%jL>$,%Q%C%1!<%8L>$G$9!#(B
$B$3$N%Q%C%1!<%8L>$O(B setup.rb $B$N%X%k%W%a%C%;!<%8$KI=<($5$l!"(B
$B%$%s%9%H!<%k$9$k%Q%C%1!<%8$r(B --with $B$d(B --without $B$G%f!<%6$,(B
$BA*Br$9$k$H$-$K;H$o$l$^$9!#(B
</p>
<p>
$B$^$?%G%U%)%k%H$@$H%Q%C%1!<%8$O%=!<%H=g$K%$%s%9%H!<%k$5$l$^$9!#(B
$B=gHV$rJQ99$7$?$$$H$-$O(B metaconfig API $B$N(B declare_packages $B$r(B
$B;H$C$F$/$@$5$$!#(B
</p>
<h2>setup.rb $B$NF/$-(B</h2>
<p>
$B%U%!%$%k$r>e5-$N$H$*$jG[CV$7$F$*$1$P$"$H$O(B setup.rb $B$,<+F0E*$K(B
$B$=$l$J$j$NF0:n$r$7$F$/$l$^$9!#6qBNE*$K$O!"(Bsetup $B$N$H$-$K0J2<$N(B
$B$3$H$r<B9T$7$^$9!#(B
</p>
<ul>
<li>bin/ $B0J2<$K$"$k%U%!%$%k$,(B #! $B$G;O$^$C$F$$$F$+$D(B
$BJ8;zNs(B ruby $B$r4^$`>l9g$O(B #! $B9T$r(B --ruby-path $B$KCV$-49$($k(B</li>
<li>ext/ $B0J2<$N3HD%%b%8%e!<%k$r%3%s%Q%$%k$9$k(B</li>
</ul>
<p>
install $B$G$O0J2<$N$3$H$r<B9T$7$^$9!#(B
</p>
<ul>
<li>bin/ $B0J2<$N%U%!%$%k$r(B --bindir $B$K%$%s%9%H!<%k(B</li>
<li>lib/ $B0J2<$N(B *.rb $B$r(B --rbdir $B$K%$%s%9%H!<%k(B</li>
<li>ext/ $B0J2<$N(B *.so $B$r(B --sodir $B$K%$%s%9%H!<%k(B</li>
<li>data/ $B0J2<$N%U%!%$%k$r(B --datadir $B$K%$%s%9%H!<%k(B</li>
<li>conf/ $B0J2<$N%U%!%$%k$r(B --localstatedir $B$K%$%s%9%H!<%k(B</li>
<li>man/ $B0J2<$N%U%!%$%k$r(B --mandir $B$K%$%s%9%H!<%k(B</li>
</ul>
<h2>$B%U%C%/%U%!%$%k(B</h2>
<p>
$B%G%U%)%k%H$NF0:n$G$b$?$$$F$$$N>l9g$K$ODLMQ$7$^$9!#$7$+$7>l9g$K$h$C$F$O(B
$B%$%s%9%H!<%k;~$K$J$K$+FCJL$J:n6H$r$7$?$$$3$H$b$"$k$G$7$g$&!#$=$N(B
$B>l9g$OFCJL$J%U%!%$%k$rCV$/$3$H$GF0:n$rDI2C$9$k$3$H$,$G$-$^$9!#(B
</p>
<p>
$B$?$H$($P(B setup $B$N%?%$%_%s%0$K(B lib/tmail/ $B$G$J$K$+$r$7$?$$$H$7$?$i!"(B
lib/tmail/pre-setup.rb $B$r:n$C$F$=$NCf$K$d$j$?$$$3$H$r=q$-$^$9!#(B
</p>
<pre>
# pre-setup.rb

# racc $B$NJ8K!%U%!%$%k$r$=$N>l$G%3%s%Q%$%k(B ($BIaDL!"$d$i$J$$(B)
system &quot;racc #{srcdir_root + '/src/mp.y'} -o mailp.rb&quot;

# require 'tmail' $B$G(B tmail/ $B$NCf?H$rA4It(B require $B$G$-$k$h$&$K$9$k(B
list = Dir.glob(curr_srcdir + '/*.rb').collect {|n| File.basename(n) }
File.open( '_loadlib.rb', 'w' ) {|f|
  f.puts list.collect {|n| &quot;require 'tmail/&quot; + n + &quot;'&quot; }
}
File.open( '../tmail.rb', 'w' ) {|f|
  f.puts &quot;require 'tmail/_loadlib'&quot;
}
</pre>
<p>
$B0lHL$K$O!"%G%#%l%/%H%j$KF~$C$?D>8e$K(B pre-TASK.rb $B$r!"(B
$B%G%#%l%/%H%j$r=P$kD>A0$K(B post-TASK.rb $B$r<B9T$7$^$9!#(B
TASK $B$NItJ,$K;H$($k$b$N!J%U%C%/2DG=$J%?%9%/!K$O(B
config, setup, install, test, clean, distclean $B$NO;$D$G$9!#(B
</p>
<p>
$B$^$?%U%C%/%9%/%j%W%H$N<B9TCf$KNc30$,5/$-$?>l9g$O%$%s%9%H!<%i(B
$BA4BN$,B(:B$K<:GT$7$^$9!#5U$K8@$&$H!"=hM}<:GT$N;~$ONc30$rEj$2$l$P(B
$B$h$$$H$$$&$3$H$G$9!#(Bexit $B$O$7$J$$$G$/$@$5$$!#(B
</p>
<p>
$B$^$?%U%C%/%U%!%$%k$NNc$G(B srcdir_root $B$d(B curr_srcdir $B$H$$$&(B
$B%a%=%C%I$r;H$C$F$$$k$3$H$KCm0U$7$F$/$@$5$$!#(Bsetup.rb $B$K$O!"(B
$B:n$C$?%U%!%$%k$@$1$rJL$N%G%#%l%/%H%j$KCV$/;EAH$_$,$"$k(B
$B!J(Bsrcdir $B$H(B objdir $B$,6hJL$5$l$F$$$k!K$N$G!"%+%l%s%H%G%#%l%/%H%j$+$i(B
$BFI$a$P$h$$$H$O8B$j$^$;$s!#%U%C%/%U%!%$%kCf$G$O0J2<$N%k!<%k$K=>$C$F(B
$B$/$@$5$$!#(B
</p>
<ul>
<li>$BFI$_$3$_$O>o$K8=:_$N(B srcdir (curr_srcdir) $B$+$i9T$&!#(B</li>
<li>$B=q$-$3$_$O>o$K%+%l%s%H%G%#%l%/%H%j$KBP$7$F9T$&!#(B</li>
</ul>
<p>
srcdir/objdir $B$N;EAH$_(B
</p>
<pre>
archive_top/                  srcdir $B$OJQ99$7$J$$$G(B
    ext/tmail/scanmail/
        MANIFEST
        depend
        extconf.rb
        scanmail.c

OBJ/                          $BBP1~$9$k(B objdir $B$K:n$C$?$b$N$rCV$/(B
    ext/tmail/scanmail/
        Makefile
        scanmail.o
        scanmail.so
</pre>
<p>
$B$3$N>l9g(B archive_top/ $B$r!V(Bsrcdir $B$N%k!<%H!W!"(B
OBJ/ $B$r!V(Bobjdir $B$N%k!<%H!W$H8@$$$^$9!#(B
$B$^$?(B archive_top/ext/tmail/scanmail/ $B$r!V%+%l%s%H(B srcdir$B!W!"(B
OBJ/ext/tmail/scanmail/ $B$r!V%+%l%s%H(B objdir$B!W$H8F$S$^$9!#(B
</p>
<p>
$B$3$&$7$F$*$/$H!"(Bsrcdir $B$KBP$7$F$OFI$_=P$7$7$+9T$o$l$J$$$N$G!"(B
clean $B$J$I$7$J$/$F$b>o$K(B srcdir $B$r:G>.8B$N%U%!%$%k$N$-$l$$$J(B
$B>uBV$KJ]$F$^$9!#$^$?%^%K%"%C%/$J$H$3$m$G$OJ#?t$N%/%m%9%3%s%Q%$%k$r(B
$BF1;~$K9T$C$?$j$b$G$-$k$h$&$K$J$j$^$9!#$=$3$^$G$$$+$J$/$H$b!"(B
$B%3%s%Q%$%k%*%W%7%g%s$@$1$rJQ$($F$$$/$D$b$N%P!<%8%g%s$r:n$C$?$j$9$k(B
$B$3$H$O$"$k$G$7$g$&!#$3$N;EAH$_$O$=$N$h$&$J>l9g$KJXMx$J$N$G$9!#(B
</p>
<p>
srcdir/objdir $BBP1~$O@dBPI,MW$H$$$&$o$1$G$O$"$j$^$;$s$,!"BP1~$7$F(B
$B$*$$$FB;$O$"$j$^$;$s!#(B
</p>
<p>
$B$^$?(B curr_srcdir $B$d(B srcdir_root $B$J$I(B
$B%U%C%/%U%!%$%kCf$G;H$($k(B API $B$K$D$$$F$OJL%Z!<%8$N(B
&lt;a href=&quot;hookapi.html&quot;&gt;$B%U%C%/(B API $B%j%U%!%l%s%9(B&lt;/a&gt;
$B$r;2>H$7$F$/$@$5$$!#(B
</p>
<h2>$B%a%?%3%s%U%#%0(B</h2>
<p>
setup.rb $B$G$O!"(Bconfig $B$N%?%9%/%*%W%7%g%s$rA}$d$9$3$H$,$G$-$^$9!#(B
$B$3$N$?$a$K;H$&$N$,(B metaconfig $B%U%!%$%k$G$9!#(B
</p>
<p>
$BNc$($P!"(Blibc $B$N%Q%9$r;XDj$9$k$?$a$N(B config $B%*%W%7%g%s(B --libc $B$H!"(B
win32 $B%5%]!<%H$N%*%s%*%U$r;XDj$9$k$?$a$N%*%W%7%g%s(B --win32 $B$r(B
$BDI2C$7$F$_$^$7$g$&!#(Bsetup.rb $B$rCV$/$N$HF1$8%G%#%l%/%H%j$K(B metaconfig
$B$H$$$&%U%!%$%k$r:n$j!"$3$NCf$K0J2<$N$h$&$J(B Ruby $B%9%/%j%W%H$r=q$-$^$9!#(B
</p>
<pre>
add_path_config 'libc', '/lib/libc.so', 'path to the C standard library'
add_bool_config 'win32', false, 'compile with Win32 support'
</pre>
<p>
$B$3$l$G!"%Q%9$r;XDj$9$k%*%W%7%g%s(B --libc $B$H!"??56CM$r<h$k(B
$B%*%W%7%g%s(B--win32 $B$,DI2C$5$l$^$7$?!#0J2<$N$h$&$K(B config
$B$N$H$-$K;H$&$3$H$,$G$-$^$9!#(B
</p>
<pre>
ruby setup.rb config --libc=/lib/libc-devel.so --win32
</pre>
<p>
$B$^$?(B setup.rb $B$N%X%k%W%a%C%;!<%8$K$b<+F0E*$KI=<($5$l$^$9!#(B
</p>
<p>
metaconfig $B$G;H$($k(B API $B$K$D$$$F$O(B
&lt;a href=&quot;metaconfapi.html&quot;&gt;metaconfig API $B%j%U%!%l%s%9%^%K%e%"%k(B&lt;/a&gt;
$B$r;2>H$7$F$/$@$5$$!#(B
</p>
<h2>$B0JA0$N%P!<%8%g%s$H$N8_49@-(B</h2>
<p>
$B%$%s%9%H!<%i$H$$$&$b$N$NFC<l@-$r9M$(!"(B
$B8_49@-$O$^$C$?$/J]$C$F$$$^$;$s!#(B2.0 $B0JA0$H$OJLJ*$H;W$C$F$/$@$5$$!#(B
$BA0%P!<%8%g%s$NF0:n$,I,MW$J$i$P$=$N%P!<%8%g%s$r;H$$$^$7$g$&!#(B
$B0JA0$N%P!<%8%g%s$H$O0J2<$NE@$GHs8_49$G$9!#(B
</p>
<ul>
<li>$B%G%#%l%/%H%j9=B$$,40A4$K0c$&(B</li>
<li>PATHCONV $B$,$J$$(B</li>
<li>share/ $B"*(B data/</li>
<li>$B%U%C%/$N7A<0$,0c$&(B</li>
<li>dryrun $B%3%^%s%I$,$J$$(B $B"*(B --prefix $B;H$C$F%$%s%9%H!<%k$7$F$/$@$5$$!#(B</li>
</ul>
<h2>$B%i%$%;%s%9$K$D$$$F(B</h2>
<p>
setup.rb $B<+BN$O(B GNU LGPL (Lesser General Public License) version 2.1
$B$K=>$C$FG[I[$7$^$9!#>\:Y$O%U%!%$%k(B COPYING $B$r8+$F$/$@$5$$!#$^$?!"(B
setup.rb $B$r;H$C$F%$%s%9%H!<%k$9$k%W%m%0%i%`$,(B LGPL $B$G$"$kI,MW$O(B
$B$"$j$^$;$s!#(B
</p>
<h2>$B%$%s%9%H!<%k%^%K%e%"%k(B</h2>
<p>
$B$3$N%"!<%+%$%V$K4^$^$l$F$$$k(B Usage_*.txt $B$O<+M3$K%3%T!<!&JT=8(B
$B$7$F<+J,$N%Q%C%1!<%8$K;H$C$F$/$@$5$$!#(BCopyright $BI=<($,F~$C$F(B
$B$$$^$9$,!"$3$l$OC1$K<+F02=$,3Z$@$+$iF~$C$F$$$k$@$1$J$N$G>C$7$F$b(B
$B9=$$$^$;$s!#(B
</p>

</body>
</html>
